Release 10.1A: OpenEdge Development:
.NET Open Clients
Defining the schema for a ProDataSet parameter
Defining the schema for a Progress 4GL ProDataSet (
DATASETorDATASET-HANDLE) parameter is a multi-step process.
![]()
To define the schema for a ProDataSet parameter:
- If the parameter is for input or input-output, define an ADO.NET
DataSetto hold the parameter value.- Define a
ProDataSetMetaDataobject to specify its schema.- Define the temp-tables for the
ProDataSetMetaDataobject.- Define the data-relations for the
ProDataSetMetaDataobject.- Add the
ProDataSetMetaDataobject and theDataSet(if applicable) as a ProDataSet parameter to yourParamArrayobject using the appropriate set parameter method.Defining a ProDataSetMetaData object
For each ProDataSet parameter you must define a
Progress.Open4GL.Proxy.ProDataSetMetaDataobject. You use this object to specify the schema for the ProDataSet when you set theDATASETorDATASET-HANDLEparameter in theParamArrayobject. You can create an instance of this object using the following constructor:
proDataSetNameSpecifies the ProDataSet name in the 4GL.
strongTypeNameSpecifies the type name for a strongly-typed ADO.NET
DataSet, ornull.Defining the temp-tables for the ProDataSetMetaData object
You must define the meta data for each temp-table contained by the
ProDataSetMetaData. For more information, see the following sections:You can then add the temp-table meta data (
TempTableMetaData) to theProDataSetMetaDataobject using the followingProDataSetMetaDatamethod:
dtMetaDataSpecifies the meta data for a temp-table.
Defining the data-relations for the ProDataSetMetaData object
You must define any data-relations that are defined for the 4GL ProDataSet using
Progress.Open4GL.Proxy.ProDataRelationMetaDataobjects. You can create aProDataRelationMetaDataobject for each data-relation between a parent and child temp-table using the following constructor:
dataRelationNameSpecifies the name of the
ProDataRelationMetaDataobject.parentIxSpecifies a 0-based index to a parent temp-table (ADO.NET
DataTable) that corresponds to the order in which you have added theTempTableMetaDatato theProDataSetMetaDatausing theProDataSetMetaDataAddDataTable()method. If you have the ADO.NETDataSetfor the ProDataSet, you can also use the ADO.NETDataSet.Tablesproperty to identify the order for this index value.childIxSpecifies a 0-based index to a child temp-table (ADO.NET
DataTable) that corresponds to the order in which you have added theTempTableMetaDatato theProDataSetMetaDatausing theProDataSetMetaDataAddDataTable()method. If you have the ADO.NETDataSetfor the ProDataSet, you can also use the ADO.NETDataSet.Tablesproperty to identify the order for this index value.numPairsSpecifies the number of column property pairs (key field pairs) that represent this relationship. This allows multiple fields to represent a key relationship between the parent and child temp-table.
pairsListSpecifies a
Note: For the equivalentstringcontaining a comma-separated list of field names. The list consists ofnumPairsfield pairs, where the child temp-table field name for each pair is followed by its matching parent temp-table field name. The data types of the named child and parent temp-table field pairs must be comparable.ProDataRelationMetaData()constructor in the Java OpenAPI, the order of child and parent field names in thepairsListparameter is reversed. For more information, see OpenEdge Development: Java Open Clients .You can add each data-relation definition to the
ProDataSetMetaDataobject using the following method:
drMetaDataSpecifies a data-relation to include in the
ProDataSetMetaDataobject.Adding the ProDataSetMetaData object with its DataSet as a ProDataSet parameter
Add the
ProDataSetMetaDataobject together with the ADO.NETDataSetit describes by passing them as parameters of theAddDataset()orAddDatasetHandle()method that you use to add the ProDataSet parameter to theParamArrayobject. For more information, see the "DATASET and DATASET-HANDLE" section.Example 8–2 adds a temp-table parameter defined with no indexes:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |